using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class AdRotatorPage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
         //Methods();
    }
    
    void Methods()
    {
        AdRotator AdRotator2 = new AdRotator();
        this.form1.Controls.Add(AdRotator2);
        DataTable dataTable = new DataTable();
        dataTable.Columns.Add("ImageUrl");
        dataTable.Columns.Add("NavigateUrl");
        dataTable.Columns.Add("AlternateText");
        dataTable.Columns.Add("Impressions");
        
        DataRow dataRow = dataTable.NewRow();
        dataRow[0] = "advs/aspbanner.gif";
        dataRow[1] = "training/asp.aspx?type=class";
        dataRow[2] = "Active Server Page .NET 2.0";
        dataRow[3] = "70";
        dataTable.Rows.Add(dataRow);

        dataRow = dataTable.NewRow();
        dataRow[0] = "advs/sqlbanner.gif";
        dataRow[1] = "training/sql2005.aspx?type=class";
        dataRow[2] = "SQL Server 2005";
        dataRow[3] = "30";
        dataTable.Rows.Add(dataRow);

        AdRotator2.DataSource = dataTable;        
        AdRotator2.DataBind();
    }
}
